home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume14 / pcomm / patch1 < prev    next >
Encoding:
Internet Message Format  |  1988-05-18  |  6.3 KB

  1. Subject:  v14i105:  Dial out and terminal emulator, Patch1
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: fthood!egray
  7. Posting-number: Volume 14, Issue 105
  8. Archive-name: pcomm/patch1
  9.  
  10. [  The comp.sources.unix distribution of Pcomm already has patches 1 and 2
  11.    integrated.  There are two dummy files, and patch3 and patch4;
  12.    here's what they fix:
  13.     Now works with external modems on the AT&T Unix PC 7300/3B1.
  14.     (Many thanks to Karl Fox (...mstar!karl) for finding this one.)
  15.  
  16.     Some fixes for some modems, including ability to ignore DCD and
  17.     avoid initializing them twice.
  18.  
  19.     --r$  ]
  20.  
  21. I only release patches when it's necessary (really!)... I'm not just
  22. hacking on the code.  I guess I'm allowed a *few* errors in 10,000 lines
  23. of code :-)
  24.  
  25. Emmet P. Gray                US Army, HQ III Corps & Fort Hood
  26. ...!ihnp4!uiucuxc!fthood!egray        Attn: AFZF-DE-ENV
  27.                     Directorate of Engineering & Housing
  28.                     Environmental Management Office
  29.                     Fort Hood, TX 76544-5057
  30.  
  31. #! /bin/sh
  32. # This is a shell archive.  Remove anything before this line, then unpack
  33. # it by saving it into a file and typing "sh file".  To overwrite existing
  34. # files, type "sh file -c".  You can also feed this as standard input via
  35. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  36. # will see the following message at the end:
  37. #        "End of shell archive."
  38. # Contents:  patch1 patch2 patch3 patch4
  39. # Wrapped by rsalz@fig.bbn.com on Wed May 18 18:20:54 1988
  40. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  41. if test -f 'patch1' -a "${1}" != "-c" ; then 
  42.   echo shar: Will not clobber existing file \"'patch1'\"
  43. else
  44. echo shar: Extracting \"'patch1'\" \(52 characters\)
  45. sed "s/^X//" >'patch1' <<'END_OF_FILE'
  46. This distribution came with patch 1 already applied
  47. END_OF_FILE
  48. if test 52 -ne `wc -c <'patch1'`; then
  49.     echo shar: \"'patch1'\" unpacked with wrong size!
  50. fi
  51. # end of 'patch1'
  52. fi
  53. if test -f 'patch2' -a "${1}" != "-c" ; then 
  54.   echo shar: Will not clobber existing file \"'patch2'\"
  55. else
  56. echo shar: Extracting \"'patch2'\" \(52 characters\)
  57. sed "s/^X//" >'patch2' <<'END_OF_FILE'
  58. This distribution came with patch 2 already applied
  59. END_OF_FILE
  60. if test 52 -ne `wc -c <'patch2'`; then
  61.     echo shar: \"'patch2'\" unpacked with wrong size!
  62. fi
  63. # end of 'patch2'
  64. fi
  65. if test -f 'patch3' -a "${1}" != "-c" ; then 
  66.   echo shar: Will not clobber existing file \"'patch3'\"
  67. else
  68. echo shar: Extracting \"'patch3'\" \(929 characters\)
  69. sed "s/^X//" >'patch3' <<'END_OF_FILE'
  70. Now works with external modems on the AT&T Unix PC 7300/3B1.
  71. X(Many thanks to Karl Fox (...mstar!karl) for finding this one.)
  72. X
  73. X*** dial.c.old    Sat Apr  2 16:11:16 1988
  74. X--- dial.c    Sat Apr  2 16:15:14 1988
  75. X***************
  76. X*** 102,107
  77. X              }
  78. X              n++;
  79. X          }
  80. X      }
  81. X  
  82. X  #else /* UNIXPC */
  83. X
  84. X--- 102,108 -----
  85. X              }
  86. X              n++;
  87. X          }
  88. X+         return;
  89. X      }
  90. X  #endif /* UNIXPC */
  91. X  
  92. X***************
  93. X*** 103,108
  94. X              n++;
  95. X          }
  96. X      }
  97. X  
  98. X  #else /* UNIXPC */
  99. X      send_str(s);
  100. X
  101. X--- 104,110 -----
  102. X          }
  103. X          return;
  104. X      }
  105. X+ #endif /* UNIXPC */
  106. X  
  107. X      send_str(s);
  108. X      return;
  109. X***************
  110. X*** 104,110
  111. X          }
  112. X      }
  113. X  
  114. X- #else /* UNIXPC */
  115. X      send_str(s);
  116. X  #endif /* UNIXPC */
  117. X      return;
  118. X
  119. X--- 106,111 -----
  120. X      }
  121. X  #endif /* UNIXPC */
  122. X  
  123. X      send_str(s);
  124. X      return;
  125. X  }
  126. X***************
  127. X*** 106,112
  128. X  
  129. X  #else /* UNIXPC */
  130. X      send_str(s);
  131. X- #endif /* UNIXPC */
  132. X      return;
  133. X  }
  134. X  
  135. X
  136. X--- 107,112 -----
  137. X  #endif /* UNIXPC */
  138. X  
  139. X      send_str(s);
  140. X      return;
  141. X  }
  142. X  
  143. X
  144. X
  145. END_OF_FILE
  146. if test 929 -ne `wc -c <'patch3'`; then
  147.     echo shar: \"'patch3'\" unpacked with wrong size!
  148. fi
  149. # end of 'patch3'
  150. fi
  151. if test -f 'patch4' -a "${1}" != "-c" ; then 
  152.   echo shar: Will not clobber existing file \"'patch4'\"
  153. else
  154. echo shar: Extracting \"'patch4'\" \(2323 characters\)
  155. sed "s/^X//" >'patch4' <<'END_OF_FILE'
  156. This patch will allow Pcomm to
  157. ignore the DCD (Data Carrier Dectect) signal on the modem.  This will help
  158. out finicky modems (those that can't ignore the DCD themselves).
  159. X
  160. Also, some modems like to be initialized only once, so that change was made.
  161. X
  162. X*** old/line_set.c    Thu Apr 14 07:51:59 1988
  163. X--- line_set.c    Thu Apr 14 07:51:46 1988
  164. X***************
  165. X*** 34,40
  166. X      tbuf.c_cc[5] = 0;
  167. X      tbuf.c_oflag = 0;
  168. X      tbuf.c_iflag = 0;
  169. X!     tbuf.c_cflag = (CREAD|HUPCL);
  170. X      tbuf.c_lflag = 0;
  171. X  
  172. X      /*
  173. X
  174. X--- 34,40 -----
  175. X      tbuf.c_cc[5] = 0;
  176. X      tbuf.c_oflag = 0;
  177. X      tbuf.c_iflag = 0;
  178. X!     tbuf.c_cflag = (CREAD|HUPCL|CLOCAL);
  179. X      tbuf.c_lflag = 0;
  180. X  
  181. X      /*
  182. X*** old/port.c    Thu Apr 14 07:51:59 1988
  183. X--- port.c    Thu Apr 14 07:51:46 1988
  184. X***************
  185. X*** 27,32
  186. X  {
  187. X      int i, j, k, progpid, fd, list[NUM_TTY];
  188. X      char file[80], buf[80], message[80], *strdup();
  189. X      void error_win(), line_set(), release_port(), send_str();
  190. X      void free_ptr();
  191. X      
  192. X
  193. X--- 27,33 -----
  194. X  {
  195. X      int i, j, k, progpid, fd, list[NUM_TTY];
  196. X      char file[80], buf[80], message[80], *strdup();
  197. X+     unsigned int sleep();
  198. X      void error_win(), line_set(), release_port(), send_str();
  199. X      void free_ptr();
  200. X      
  201. X***************
  202. X*** 38,45
  203. X          if (!strcmp(dir->index[dir->d_cur], modem->tty[modem->t_cur]) ||
  204. X           modem->mbaud[modem->t_cur] >= dir->baud[dir->d_cur]) {
  205. X              /*
  206. X!              * Re-initialize the modem because the baud
  207. X!              * rate (or other parameters) may have changed.
  208. X               */
  209. X              line_set();
  210. X              send_str(modem->init[modem->m_cur]);
  211. X
  212. X--- 39,46 -----
  213. X          if (!strcmp(dir->index[dir->d_cur], modem->tty[modem->t_cur]) ||
  214. X           modem->mbaud[modem->t_cur] >= dir->baud[dir->d_cur]) {
  215. X              /*
  216. X!              * Reset the line because the baud rate (or other
  217. X!              * parameters) may have changed.
  218. X               */
  219. X              line_set();
  220. X              return(0);
  221. X***************
  222. X*** 42,48
  223. X               * rate (or other parameters) may have changed.
  224. X               */
  225. X              line_set();
  226. X-             send_str(modem->init[modem->m_cur]);
  227. X              return(0);
  228. X          }
  229. X      }
  230. X
  231. X--- 43,48 -----
  232. X               * parameters) may have changed.
  233. X               */
  234. X              line_set();
  235. X              return(0);
  236. X          }
  237. X      }
  238. X***************
  239. X*** 145,150
  240. X              }
  241. X                      /* initialize the modem */
  242. X              send_str(modem->init[j]);
  243. X              return(0);
  244. X          }
  245. X          i++;
  246. X
  247. X--- 145,151 -----
  248. X              }
  249. X                      /* initialize the modem */
  250. X              send_str(modem->init[j]);
  251. X+             sleep(1);
  252. X              return(0);
  253. X          }
  254. X          i++;
  255. X
  256. X
  257. X
  258. END_OF_FILE
  259. if test 2323 -ne `wc -c <'patch4'`; then
  260.     echo shar: \"'patch4'\" unpacked with wrong size!
  261. fi
  262. # end of 'patch4'
  263. fi
  264. echo shar: End of shell archive.
  265. exit 0
  266.